package com.hyt.it.ogt.kq.service.govData.model.entity.kz;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hyt.common.apiInfor.DataType;
import com.hyt.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 考试基本信息
 * </p>
 *
 * @author 刘恒活
 * @since 2020-05-15
 */

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("kw_exam")
@ApiModel(value="考试基本信息")
public class Exam extends BaseEntity {

    private static final long serialVersionUID = 1L;
    
    @ApiModelProperty(value = "考试任务Id", dataType= DataType.STRING)
    private String taskId;
    
    @ApiModelProperty(value = "考试任务名称", dataType= DataType.STRING)
    private String taskName;

    @ApiModelProperty(value = "考试名称", dataType= DataType.STRING)
    @Length(min=1, max = 50, message = "考试名称不能为空且长度在[1,50]之间")
    @NotNull(message = "考试名称不能为空")
    private String examName;

    @ApiModelProperty(value = "开始时间，时间格式yyyy-MM-dd HH:mm:ss", dataType= DataType.STRING)
    @NotNull(message = "开始时间不能为空")
    private LocalDateTime beginDate;

    @ApiModelProperty(value = "结束时间，时间格式yyyy-MM-dd HH:mm:ss", dataType= DataType.STRING)
    @NotNull(message = "结束时间不能为空")
    private LocalDateTime endDate;

    @ApiModelProperty(value = "欢迎语", dataType= DataType.STRING)
    @Length(min=1, max = 300, message = "欢迎语不能为空且长度在[1,300]之间")
    @NotNull(message = "欢迎语不能为空")
    private String welcomeComment;

    @ApiModelProperty(value = "考生须知", dataType= DataType.STRING)
    @NotNull(message = "考生须知不能为空")
    @TableField(exist =false)
    private String agreement;

    @ApiModelProperty(value = "是否已发布考试，1 表示是，0 表示否", dataType= DataType.BOOLEAN)
    @TableField("is_publish_exam")
    private Boolean publishExam;

    @ApiModelProperty(value = "是否发布成绩，1 表示是，0 表示否", dataType= DataType.BOOLEAN)
    @TableField("is_publish_result")
    private Boolean publishResult;

    @ApiModelProperty(value = "所属报名ID", dataType= DataType.STRING)
    private String enrollId;

    @ApiModelProperty(value = "所属报名名称", dataType= DataType.STRING)
    private String enrollName;

    @ApiModelProperty(value = "默认语言", hidden = true)
    private Integer defaultLanguage;

    @ApiModelProperty(value = "考试地址")
    private String examUrl;

    @ApiModelProperty(value = "考试二维码")
    private String qrCode;

    @ApiModelProperty(value = "是否模板，1表示是，0表示否，新建考试时默认以此为模板", hidden = true)
    @TableField("is_candidate_config_template")
    private Boolean candidateConfigTemplate;

    @ApiModelProperty(value = "随机生成的6位数字", hidden = true)
    private Integer randomId;

    @ApiModelProperty(value = "机构ID", hidden = true)
    private String officeId;

    @ApiModelProperty(value = "部门ID", hidden = true)
    private String deptId;

    @ApiModelProperty(value = "上级部门", hidden = true)
    private String ancestors;

    @ApiModelProperty(value = "上传文件限制的大小", hidden = true)
    @TableField(exist = false)
    private Long uploadImageLimitSize;    
    
    @ApiModelProperty(value = "是否大湾区考试，1 表示是，0 表示否", dataType= DataType.BOOLEAN, hidden = true)
    @TableField(exist = false)
    private Boolean shenGangAoExam;

    @ApiModelProperty(value = "是否与平台关联，1 表示是，0 表示否", dataType= DataType.BOOLEAN)
    @TableField("is_bind_platform")
    private Boolean bindPlatform;
}
